package com.hjd.shop.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hjd.shop.api.service.SOrderService;
import com.hjd.shop.base.Response;
import com.hjd.shop.entity.SGoods;
import com.hjd.shop.entity.SOrder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: hjd
 * @Date: 2020/10/25 0025 21:19
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Reference
    private SOrderService orderService;

    @PostMapping("/add")
    public void addGoods(@RequestBody SGoods goods){

    }
    @PostMapping("/confirmOrder")
    public Response confirmOrder(@RequestBody SOrder order){
        return orderService.confirmOrder(order);
    }
}
